package collection;

import java.util.Iterator;

public interface IGraph<V, E> {

	public int vertexCount();
	
	public int edgeCount();
	
	public boolean isEmpty();
	
	public Vertex<V,E> createVertex(V element);
	
	public Edge<E,V> createEdge(E element, Vertex<V,E> v1, Vertex<V,E> v2);
	
	public Edge<E,V> createEdge(Vertex<V,E> v1, Vertex<V,E> v2);
	
	public void addVertex(Vertex<V,E> vertex);
	
	public void addEdge(Edge<E,V> edge);
	
	public Vertex<V,E> addVertexElement(V element);
	
	public Edge<E,V> addEdgeElement(E element, Vertex<V,E> v1, Vertex<V,E> v2);
	
	public Edge<E,V> addEdge(Vertex<V,E> v1, Vertex<V,E> v2);
	
	public void removeVertex(Vertex<V,E> vertex);
	
	public void removeEdge(Edge<E,V> edge);
	
	public HashSet<Edge<E,V>> incidentEdges(Vertex<V,E> vertex);
	
	public HashSet<Vertex<V,E>> endVertices(Edge<E,V> edge);
	
	public Vertex<V,E> oppositeVertex(Edge<E,V> edge, Vertex<V,E> vertex);
	
	public boolean hasEdge(Vertex<V,E> vertex, Edge<E,V> edge);
	
	public boolean hasVertex(Edge<E,V> edge, Vertex<V,E> vertex);
	
	public Iterator<Vertex<V,E>> vertices();
	
	public Iterator<Edge<E,V>> edges();

}
